<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            width: 100px;
            margin: 100px auto;
            position: relative;
            transform-style: preserve-3d;
            transition: all 3s;
            transform: rotateX(-30deg) rotateY(30deg);
        }

        .box:hover {
            transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
        }

        /* 骰子盒 */
        .circle {
            width: 100px;
            height: 100px;
            padding: 5px;
            display: flex;
            background-color: #fff;
            border: 2px solid #000;
            box-sizing: border-box;
            position: absolute;
            top: 0;
            left: 0;
        }

        /* 小圆点 */
        .spot {
            width: 15px;
            height: 15px;
            background: #000;
            border-radius: 50%;
        }

        /* 第一个 */
        .one {
            justify-content: center;
            align-items: center;
            transform: translateZ(50px);
        }

        /* 第二个 */
        .two {
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            transform: rotateX(-90deg) translateZ(50px);
        }

        /* 第三个 */
        .three {
            justify-content: space-between;
            transform: rotateY(90deg) translateZ(50px);
        }

        .three div:nth-child(2) {
            align-self: center;
        }

        .three div:nth-child(3) {
            align-self: flex-end;
        }

        /* 第四个 */
        .four {
            flex-direction: column;
            justify-content: space-between;
            transform: rotateY(180deg) translateZ(50px);
        }

        .four>div {
            display: flex;
            justify-content: space-between;
        }

        /* 第五个 */
        .five {
            flex-direction: column;
            justify-content: space-between;
            transform: rotateX(90deg) translateZ(50px);
        }

        .five>div {
            display: flex;
        }

        .five .top {
            justify-content: space-between;
        }

        .five .middle {
            justify-content: center;
        }

        .five .bottom {
            justify-content: space-between;
        }

        /* 第六个 */
        .six {
            justify-content: space-between;
            transform: rotateY(-90deg) translateZ(50px);
        }

        .six>div {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="one circle">
            <div class="spot"></div>
        </div>
        <div class="two circle">
            <div class="spot"></div>
            <div class="spot"></div>
        </div>
        <div class="three circle">
            <div class="spot"></div>
            <div class="spot"></div>
            <div class="spot"></div>
        </div>
        <div class="four circle">
            <div class="top">
                <div class="spot"></div>
                <div class="spot"></div>
            </div>
            <div class="bottom">
                <div class="spot"></div>
                <div class="spot"></div>
            </div>
        </div>
        <div class="five circle">
            <div class="top">
                <div class="spot"></div>
                <div class="spot"></div>
            </div>
            <div class="middle">
                <div class="spot"></div>
            </div>
            <div class="bottom">
                <div class="spot"></div>
                <div class="spot"></div>
            </div>
        </div>
        <div class="six circle">
            <div class="top">
                <div class="spot"></div>
                <div class="spot"></div>
                <div class="spot"></div>
            </div>
            <div class="bottom">
                <div class="spot"></div>
                <div class="spot"></div>
                <div class="spot"></div>
            </div>
        </div>
    </div>
</body>

</html>